<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:form id="frmCreateCalim"  >
        <f:view>
            <p:dialog id="dlgCreateCalim"
                      widgetVar="wgCreateCalim"
                      header="Create Claim"
                      draggable="true"
                      showEffect="fade"
                      hideEffect="clip"
                      >

                <h:panelGrid id="pnCreateCalim" columns="2">
                    <p:outputLabel value="BillNumber:" for="billNumber" />
                    <p:inputText  id="billNumber" value="#{calimManagement.claim.billNumber}" title="BillNumber" maxlength="10" />

                    <p:outputLabel value="ClaimMoney:" for="claimMoney" />
                    <p:inputText id="claimMoney" value="#{calimManagement.claim.claimMoney}" title="ClaimMoney" maxlength="14" />
                    <p:outputLabel value="ClaimContent:" for="claimContent" />
                    <p:editor  id="claimContent" value="#{calimManagement.claim.claimContent}"  height="200" width="400"/>

                    <p:outputLabel value="Hospital:" for="hospital" />
                    <p:selectOneMenu id="hospital" value="#{calimManagement.hospital.hospitalId}"  >
                        <f:selectItems value="#{hospitalManagement.list}"  var="item" itemLabel="#{item.hospitalName}" itemValue="#{item.hospitalId}"/>
                    </p:selectOneMenu>
                    <p:outputLabel value="ClaimType:" for="claimType" />
                    <p:selectOneMenu id="claimType" value="#{calimManagement.claimType.claimTypeId}" >
                        <f:selectItems value="#{claimTypeManagement.list}" var="item" itemLabel="#{item.claimTypeName}" itemValue="#{item.claimTypeId}"/>
                    </p:selectOneMenu>


                </h:panelGrid>


                <f:facet name="footer">
                    <p:commandButton  id="btnCreateCalim"
                                      value="Create"
                                      icon="ui-icon-check"
                                      style="margin:0"
                                      actionListener="#{calimManagement.create}"
                                      update=":frmViewClaim:dtViewClaim,:growl,:frmCreateCalim:pnCreateCalim"
                                      oncomplete="CalimManagementRequest(xhr, status, args)"
                                      />
                    <p:commandButton id="btnCancelCreateCalim"
                                     value="Cancel"
                                     icon="ui-icon-check"
                                     style="margin:0"
                                     onclick="wgCreateCalim.hide();"
                                     />
                </f:facet>
            </p:dialog>
        </f:view>
    </h:form>
</html>
